MakeTeXPK

On UNIX, when fonts are missing, dvips calls a Bourne shell script, `MakeTeXPK', which creates a temporary directory, which it then changes to, before calling to make the missing fonts. The change of directory can cause not to find font sources lying in what used to be the current directory.

Gert W. BULTMAN (bultman@dgw.rws.nl) has suggested the following modification to MakeTeXPK:

    MFINPUTS=${MFINPUTS}:`pwd`; export MFINPUTS
to add the current directory to the search path, before the change to the temporary directory:
    cd $TEMPDIR

Michał JAEGERMANN (ntomczak@vm.ucs.ualberta.ca) has pointed out that:

`This will not work very well in a situation when the MFINPUTS variable is not set, and you rely instead on files being in a default location. The problem is that in such a situation, after an execution of the line above, you will end up with ONLY your 'current working directory' in the MFINPUTS path, [which still leaves you without access to the standard files].

`For the Bourne shell, sh, this line should rather read somewhat8like:

    MFINPUTS=`pwd`:${MFINPUTS-/usr/lib/mf/inputs}
    export MFINPUTS
which gives you a fallback position. Of course,
    /usr/lib/mf/inputs
should be replaced by a default value for the MFINPUTS path.

`This problem is highly likely to affect budding hackers on NeXT, for example.'

Michał's suggestion gives priority to files in the directory that is current when MakeTeXPK is called, which is the usual preference. In sh, the `$A-B' construction has the value of A, if A is defined, and the value of B, otherwise.

Karl BERRY advises that for web2c 5.851c and above, a leading or trailing colon in a path is replaced by the compile-time default path. For web2c he suggests:

    if test -z "$MFINPUTS"; then
      MFINPUTS=`pwd`:
    else
      MFINPUTS=`pwd`:$MFINPUTS:
    fi

Test these ideas on your system, to see what is most applicable.

Incidentally, on MS-DOS, dvips calls a batch file, `MAKETEXP.BAT', but, in the MS-DOS versions I've seen, this lacks the change to a temporary directory that causes the problem that occurs both in the UNIX versions of dvips and in emTEX's MFjob.